#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,q;
struct nodee{
    int xa,ya,xb,yb;
}tt[100005];
struct node{
    int x,l,r,add;
    bool operator<(const node &rhs)const
    {
        if(x<rhs.x)
        {
            return true;
        }
        return false;
    }
}t[200005];
int lsh[200005],cntt;
struct nodetree{
    int minn,cnt,sizee,lazy;
}tree[800005];
void pushup(int x)
{
    tree[x].minn=min(tree[2*x].minn,tree[2*x+1].minn);
    tree[x].cnt=0;
    if(tree[x].minn==tree[2*x].minn)
    {
        tree[x].cnt+=tree[2*x].cnt;
    }
    if(tree[x].minn==tree[2*x+1].minn)
    {
        tree[x].cnt+=tree[2*x+1].cnt;
    }
}
void pushdown(int x)
{
    if(tree[x].lazy)
    {
        tree[2*x].lazy+=tree[x].lazy;
        tree[2*x].minn+=tree[x].lazy;
        tree[2*x+1].lazy+=tree[x].lazy;
        tree[2*x+1].minn+=tree[x].lazy;
        tree[x].lazy=0;
    }
}
void build(int l,int r,int x)
{
    if(l==r)
    {
        tree[x].minn=0;
        tree[x].cnt=lsh[l+1]-lsh[l];
        tree[x].sizee=lsh[l+1]-lsh[l];
        return;
    }
    int mid=(l+r)>>1;
    build(l,mid,2*x);
    build(mid+1,r,2*x+1);
    tree[x].sizee=tree[2*x].sizee+tree[2*x+1].sizee;
    pushup(x);
}
void gb(int l,int r,int ql,int qr,int add,int x)
{
    if(l==ql&&r==qr)
    {
        tree[x].minn+=add;
        tree[x].lazy+=add;
        return;
    }
    pushdown(x);
    int mid=(l+r)>>1;
    if(ql<=mid)
    {
        gb(l,mid,ql,min(qr,mid),add,2*x);
    }
    if(qr>mid)
    {
        gb(mid+1,r,max(ql,mid+1),qr,add,2*x+1);
    }
    pushup(x);
}
signed main()
{
    freopen("dierti.in","r",stdin);
    freopen("dierti.out","w",stdout);
    int waste;
    cin>>waste;
    cin>>n>>q;
    for(int i=1;i<=n;i++)
    {
        cin>>tt[i].xa>>tt[i].ya>>tt[i].xb>>tt[i].yb;
        lsh[++cntt]=tt[i].ya;
        lsh[++cntt]=tt[i].yb;
    }
    sort(lsh+1,lsh+cntt+1);
    waste=unique(lsh+1,lsh+cntt+1)-lsh-1;
    cntt=waste;
    //cout<<cntt<<endl;
    for(int i=1;i<=n;i++)
    {
        tt[i].ya=lower_bound(lsh+1,lsh+cntt+1,tt[i].ya)-lsh;
        tt[i].yb=lower_bound(lsh+1,lsh+cntt+1,tt[i].yb)-lsh;
        //cout<<tt[i].ya<<" "<<tt[i].yb<<endl;
    }
    build(1,cntt-1,1);
    int l,r;
    for(int i=1;i<=q;i++)
    {
        cin>>l>>r;
        int cnt=0;
        for(int j=l;j<=r;j++)
        {
            t[++cnt]={tt[j].xa,tt[j].ya,tt[j].yb,1};
            t[++cnt]={tt[j].xb,tt[j].ya,tt[j].yb,-1};
        }
        sort(t+1,t+cnt+1);
        int ans=0;
        for(int j=1;j<=cnt;j++)
        {
            int now=0;
            if(tree[1].minn==0)
            {
                now=tree[1].sizee-tree[1].cnt;
            }
            else
            {
                now=tree[1].sizee;
                //cout<<"&&"<<tree[1].cnt<<" "<<tree[1].sizee<<endl;
            }
            //cout<<"??"<<now<<" "<<t[j].x<<endl;
            if(j!=1)
            {
                ans+=now*(t[j].x-t[j-1].x);
            }
            gb(1,cntt-1,t[j].l,t[j].r-1,t[j].add,1);
        }
        cout<<ans<<endl;
    }
    return 0;
}
